package cn.ljy.uem.web.action.frontend.mobile.course;

import cn.ljy.authority.config.security.TokenUtil;
import cn.ljy.authority.config.security.UserUtil;
import cn.ljy.authority.model.SysUser;
import cn.ljy.authority.service.SysUserTokenFrontendService;
import cn.ljy.authority.web.controller.backstage.BaseBackstageController;
import cn.ljy.common.model.result.ResponseData;
import cn.ljy.uem.model.SchoolStudent;
import cn.ljy.uem.model.SchoolTeachingTaskLesson;
import cn.ljy.uem.model.query.SchoolTeachingTaskLessonQuery;
import cn.ljy.uem.service.SchoolTeachingTaskLessonService;
import cn.ljy.uem.service.common.CommonSchoolService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;


/**
 * @description 教学任务课堂模块的业务层接口
 * @author 王秋林
 * @date 2022-11-29
 */
@Api(tags = "移动端的教学任务课堂模块")
@RestController
@RequestMapping(value = "/api/mobile/schoolstudent/schoolteachingtasklesson")
public class SchoolStudentTeachingTaskLessonController extends BaseBackstageController<SchoolTeachingTaskLesson, SchoolTeachingTaskLessonQuery,Integer> {

    @Autowired
    private SchoolTeachingTaskLessonService baseService;

    @Autowired
    private CommonSchoolService commonSchoolService;

    @Autowired
    private SysUserTokenFrontendService sysUserTokenFrontendService;

    @ApiOperation(value = "查询所有教学任务课堂")
    @GetMapping("/all")
    @Override
    protected ResponseData query(SchoolTeachingTaskLessonQuery query) {
        return super.query(query);
    }

    @ApiOperation(value = "分页查询教学任务课堂列表")
    @Override
    public ResponseData query(Integer page, Integer pageSize, SchoolTeachingTaskLessonQuery query){
        return super.query(page,pageSize,query);
    }

    @ApiOperation(value = "读取教学任务课堂的信息")
    @Override
    protected ResponseData get(@PathVariable("id") Integer id) {
        return super.get(id);
    }



    @GetMapping("/getAllTeachingTaskLesson")
    @ApiOperation(value = "获取当前学生账户下的所有课堂")
    protected ResponseData getStudentAllTeachingTaskLesson(){
        return ResponseData.success(baseService.getStudentAllTechingTaskLesson());
    }
//    @ApiOperation(value = "批量删除指定的多个教学任务课堂")
//    @Override
//    protected ResponseData deletes(@NotEmpty(message = "操作失败：请选择要移除的记录") Integer[] ids) {
//        return super.deletes(ids);
//    }

//
//    @ApiOperation(value = "添加教学任务课堂")
//    @Override
//    protected ResponseData add(@Valid @RequestBody SchoolTeachingTaskLesson schoolTeachingTaskLesson) {
//        return super.add(schoolTeachingTaskLesson);
//    }

//    @ApiOperation(value = "编辑教学任务课堂")
//    @Override
//    protected ResponseData edit(@Valid @RequestBody SchoolTeachingTaskLesson schoolTeachingTaskLesson) {
//        return super.edit(schoolTeachingTaskLesson);
//    }


}
